//    Copyright (C) Kherty.  All rights reserved.
using System.Collections.Generic;
using OpenLS.Core.Serialization;

namespace OpenLS.Vml.Drawing
{
    internal class RegroupTable : IOfficeXmlSerializable
    {
        private List<Entry> entries = new List<Entry>();

        public void ReadXml(ReadContext context)
        {
            using (var c = context.Read("regrouptable"))
            {
                entries.Clear();
                entries.AddRange(c.ReadOptionalWhile<Entry>("entry"));
            }
        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.Write("regrouptable"))
            {
                c.WriteElements(entries);
            }
        }
    }
}